package vip.mtdp.asset.core.dal.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description
 * @Author Evans.wang
 * @since 2023/10/29 09:21
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_journal_detail")
public class JournalItem implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long journalId;
    private Long accountId;

    private String coin;
    private BigDecimal amount;

    /**
     * dr = debit record
     * cr = credit record
     */
    private String drCr;

    private BigDecimal openBalance;
    private BigDecimal closeBalance;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
